using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace Tracker.Data.DataTransfer
{
	/// <summary>
	/// Object data transfer definition for the 'ObjectData' table
	/// </summary>
	[Serializable]
	[DataContract]
	public partial class ObjectData : Tracker.Data.EFDAL.Interfaces.Entity.IObjectData, Tracker.Data.EFDAL.Interfaces.IDTO
	{
		#region Constructors

		/// <summary>
		/// The default contructor for the ObjectData DTO
		/// </summary>
		public ObjectData()
		{
		}

		#endregion

		#region Object Properties

		/// <summary>
		/// The AttributeId field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("AttributeId")]
		public virtual int? AttributeId { get; set; }

		/// <summary>
		/// The ID field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("ID")]
		[System.ComponentModel.DataAnnotations.Key()]
		[System.ComponentModel.ReadOnly(true)]
		public virtual int ID { get; set; }

		/// <summary>
		/// The Key field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("Key")]
		public virtual int? Key { get; set; }

		/// <summary>
		/// The Value field
		/// </summary>
		[DataMember]
		[System.ComponentModel.DisplayName("Value")]
		public virtual string Value { get; set; }

		/// <summary>
		/// The CreatedDate field
		/// </summary>
		[DataMember]
		public virtual DateTime? CreatedDate { get; set; }

		/// <summary>
		/// The CreatedBy field
		/// </summary>
		[DataMember]
		public virtual string CreatedBy { get; set; }

		/// <summary>
		/// The ModifiedDate field
		/// </summary>
		[DataMember]
		public virtual DateTime? ModifiedDate { get; set; }

		/// <summary>
		/// The ModifiedBy field
		/// </summary>
		[DataMember]
		public virtual string ModifiedBy { get; set; }


		#endregion

		#region Navigation Properties

		/// <summary>
		/// The relation ObjectAttribute -> ObjectData
		/// </summary>
		[DataMember]
		public virtual Tracker.Data.EFDAL.Interfaces.Entity.IObjectAttribute ObjectAttribute { get; set; }

		#region Clone

		/// <summary>
		/// Creates a shallow copy of this object of all simple properties
		/// </summary>
		/// <returns></returns>
		public virtual object Clone()
		{
			var newItem = new ObjectData();
			newItem.AttributeId = this.AttributeId;
			newItem.ID = this.ID;
			newItem.Key = this.Key;
			newItem.Value = this.Value;
			return newItem;
		}

		/// <summary>
		/// Creates a shallow copy of this object of all simple properties
		/// </summary>
		public static ObjectData Clone(Tracker.Data.EFDAL.Interfaces.Entity.IObjectData item)
		{
			var newItem = new ObjectData();
			newItem.AttributeId = item.AttributeId;
			newItem.ID = item.ID;
			newItem.Key = item.Key;
			newItem.Value = item.Value;
			return newItem;
		}

		#endregion

		#endregion

	}

}
